package com.baizhi;

import com.baizhi.hospital.HospitalApplication;
import com.baizhi.hospital.dao.ExamDao;
import com.baizhi.hospital.entity.Exam;
import com.baizhi.hospital.service.DepartmentService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.time.LocalDateTime;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = HospitalApplication.class)
public class testServler {
	@Autowired
	private DepartmentService departmentService;

	@Resource
	private ExamDao examDao;
	@Test
	public void test1(){
		System.out.println(departmentService.selectDepartment(1,10,null));
	}


	@Test
	public void test3(){
		Exam exam = new Exam();
		exam.setDrugId("145456453453");
		exam.setExamStatus(0);
		exam.setExamAdvice("很好");
		exam.setExamStartDate(LocalDateTime.now());
		exam.setExamEndDate(LocalDateTime.now());
		exam.setDrugId("ac336335cf3447c9aa4a0fa85d901df0");

		examDao.insertExam(exam);
	}
}
